<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
	<title>RPIJM</title>
	<link rel='shortcut icon' href='<?php echo base_url()."images/logo.jpg" ?>' />
	<link rel='stylesheet' href='<?php echo base_url()."style/css/style.css" ?>' />
	<link rel='stylesheet' href='<?php echo base_url()."style/css/table.css" ?>' />
	<link rel='stylesheet' href='<?php echo base_url()."style/css/themes/base/jquery-ui.css" ?>' />
	<link rel='stylesheet' href='<?php echo base_url()."style/css/themes/smoothness/jquery-ui-1.7.2.custom.css" ?>' />
	<script language="javascript">	var site = "<?php echo base_url(); ?>";</script>
	<script type="text/javascript" src="<?php echo base_url(); ?>js/complete.js"></script>
	<script src="<?php echo base_url(); ?>style/js/jquery-1.4.4.min.js" type="text/javascript"></script>
	<script src="<?php echo base_url(); ?>style/js/jquery.dataTables.min.js" type="text/javascript"></script>
	<script src="<?php echo base_url(); ?>style/js/jquery-ui.js" type="text/javascript"></script>
	<script src="<?php echo base_url(); ?>style/js/jquery.validate.js" type="text/javascript"></script>
	<script type="text/javascript">
		var oTable;
		/* Formating function for row details */
		function fnFormatDetails ( nTr ) {
			var aData = oTable.fnGetData( nTr );
			var sOut1 = null;
			
			var sOut = $.ajax({
				url: "matrik_rpijm/getripjm_output/"+aData[1],
				complete: function(){$("#loading").hide();},
				global: false,
				async:false,
				success: function(data) {
					sOut1 = data;
					/* $('#main-table > tbody:last').append('<tr>aa</tr><tr></tr>'); */
				}
			}).responseText;
			
			var sOut = '<table cellpadding="5" cellspacing="0" border="0">';
			sOut += '<tr><td>Rendering engine:</td><td>'+sOut1+'</td></tr>';
			sOut += '</table>';
			
			return sOut;
		}

		$(document).ready(function() {
			oTable = $('#main-table').dataTable( {
					"bProcessing"	: true,
					"bServerSide"	: true,
					"sPaginationType": "full_numbers",
					"bAutoWidth"	: false,
					"sAjaxSource"	: "matrik_rpijm/kegiatan_listing",
					"bAutoWidth"	: true,
					"bFilter"		: false,
					"bSort"			: false,
					"bInfo"			: false,
					"sScrollY"		: 300,
					"sScrollX"		: "100%",
					"sScrollXInner"	: "150%"
				} );
		} );
	  
		$('#main-table tbody td img').live( 'click', function () {
			var nTr = this.parentNode.parentNode;
			if ( this.src.match('details_close') )
			{
				/* This row is already open - close it */
				this.src = "<?php base_url();?>style/images/details_open.png";
				oTable.fnClose( nTr );
			}
			else
			{
				/* Open this row */
				this.src = "<?php base_url();?>style/images/details_close.png";
				oTable.fnOpen( nTr, fnFormatDetails(nTr), 'details' );
			}
		} );
		
		function load_options(id, index){
			$("#loading").show();
			
			$("#"+index).html('<option value="">Pilih '+index+'</option>');
			$.ajax({
				url: "matrik_rpijm/get"+index+"/"+id,
				complete: function(){$("#loading").hide();},
				success: function(data) {
					$("#"+index).html(data);
				}
			})
		}
	</script>
	
</head>
<body>

	<?php $this->load->view('layout/header-nav'); ?>
	<?php $this->load->view('rpijm/olahdata/mrpijm_list'); ?>
		
</body>
</html>

